﻿using UnityEngine;
using System.Collections;

namespace Room
{
    public class RCAIUnionActorDefend : RCAIUnionActorBase
    {
        GameObject effectObj = null;
        protected override void OnEnter()
        {
            controller.owner.PlayAnim(AniName.STAND_FIGHT);
            if (effectObj == null)
            {
                effectObj = controller.Spawn(RoomUnionFight.DEFENSE);
            }
            else
            {
                effectObj.SetActive(true);
            }
        }

        protected override void OnTick()
        {
            controller.owner.move.StopMove();
        }

        protected override void OnLeave()
        {
            controller.Unspawn(effectObj);
        }
    }
}